/************************************************************************

								Heroes IV
					  Copyright 2001, The 3DO Company

	------------------------------------------------------------------
  						   dialog_caravan_arrivals.h

	$Header: $

	$NoKeywords: $

 ************************************************************************/

#ifndef DIALOG_CARAVAN_ARRIVALS_H_INCLUDED
#define DIALOG_CARAVAN_ARRIVALS_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>

#include "bitmap_group_ptr.h"
#include "bitmap_layer_window_ptr.h"
#include "button_ptr.h"
#include "caravan_ptr.h"
#include "creature_array_window_ptr.h"
#include "game_window.h"
#include "text_window_ptr.h"

class t_adventure_map;
class t_creature_array;
class t_scrollbar;
class t_town;

// ---------------------------------------------------------------------------
// Dialog to handle caravans which arrived but which didn't have enough room
// in the garrison to enter the city
// ---------------------------------------------------------------------------
class t_dialog_caravan_arrivals : public t_window
{
	public:
		t_dialog_caravan_arrivals( t_window * parent, t_adventure_map & map );

		bool init_dialog( t_town & town, t_creature_array * visiting_army );

	private:
		enum { k_displayed_caravans = 3 };

		typedef std::vector< t_caravan_ptr > t_caravan_array;

		void move_garrison_clicked();
		void move_to_garrison_clicked( int visible_index );
		void move_to_visiting_clicked( int visible_index );
		void move_visiting_clicked();
		void ok_clicked( t_button * );
		void scroll( t_scrollbar *, int position );

		t_bitmap_group_ptr						m_bitmaps;
		t_caravan_array							m_caravans;
		t_creature_array_window_ptr				m_garrison_window;
		t_adventure_map &						m_map;
		t_creature_array_window_ptr				m_visible_caravans[ k_displayed_caravans ];
		t_creature_array_window_ptr				m_visiting_window;
};


#endif // DIALOG_CARAVAN_ARRIVALS_H_INCLUDED
